const fs = require('fs');
const path = require('path');
const ctrlObj = {
	getImageList(callback){
		let imgPath = path.resolve(__dirname, '../uploads/');
		fs.readdir(imgPath, (err, files) => {
			if(err) {
				console.log(err);
			} else {
				let arr = [];
				files.forEach(item => arr.push('/uploads/' + item));
				callback(arr);
			}
		})
	},
	addImages(){
		
	},
	deleteImages(){
		
	},
}
module.exports = ctrlObj;